package org.lqk.file.transfer.client.framework;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import org.lqk.file.transfer.netty.RequestFuture;
import org.lqk.file.transfer.protocol.RemotingCommand;

import io.netty.channel.ChannelHandlerContext;

public abstract class AbstractFileResponseProcessor implements FileResponseProcessor{
	
	
	protected ConcurrentHashMap<Integer, RequestFuture> requestTable;
	
	private final int cmdCode;
	
	public AbstractFileResponseProcessor(ConcurrentHashMap<Integer, RequestFuture> requestTable,int cmdCode){
		this.cmdCode = cmdCode;
		this.requestTable = requestTable;
	}
	
	@Override
	public abstract boolean process(ChannelHandlerContext ctx,RemotingCommand command)  throws IOException;
	@Override
	public int getCmdCode() {
		return cmdCode;
	}
	
}
